home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
SourceCode
/
AdobeExamples
/
NX_Scroll
/
lex.l
< prev
next >
Wrap
Text File
|
1992-12-19
|
1KB
|
58 lines
%{
#include "distillery.h"
extern char igetc();
#undef input()
# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):igetc())==10?(yylineno++,EOF):yytchar)==EOF?0:yytchar)
%}
%o 4000
PSALPHA [^0-9 \t\n\r\(\)<>\[\]\{\}\/\%]
PSNUM [0-9]
PSALPHANUM ({PSALPHA}|{PSNUM})
PSNAME {PSALPHANUM}*{PSALPHA}+{PSALPHANUM}*
%%
"%".*\n ;
\(.*\) return dis_string;
-?{PSNUM}+ return dis_int;
(-?{PSNUM}+\.?{PSNUM}*)|(-?{PSNUM}*\.{PSNUM}+) return dis_real;
m return dis_m;
moveto return dis_m;
l return dis_l;
lineto return dis_lineto;
x return dis_x;
y return dis_y;
X return dis_X;
Y return dis_Y;
c return dis_c;
cp return dis_cp;
f return dis_f;
s return dis_s;
clip return dis_clip;
T return dis_T;
A return dis_A;
W return dis_W;
AW return dis_AW;
R return dis_R;
r return dis_r;
L return dis_L;
w return dis_w;
g return dis_g;
j return dis_j;
d return dis_d;
setmiterlimit return dis_miter;
setlinecap return dis_cap;
RGB return dis_RGB;
MF return dis_MF;
FF return dis_FF;
DF return dis_DF;
F return dis_F;
IMAGEMASK return dis_IMASK;
IMAGE return dis_IMAGE;
BEGINPAGE return dis_BPAGE;
ENDPAGE return dis_EPAGE;
REMAP return dis_REMAP;
RECODE return dis_RECODE;
\/{PSNAME} return dis_literal;
{PSNAME} return dis_name;
.|\n ;